package com.polaris;

/**
 * 基础商品对象
 */
public class Product implements Category{

    // 商品 id
    private String productId;

    // 商品名称
    private String productName;

    // 一级类目id
    private String categoryOneId;

    // 一级类目名称
    private String categoryOneName;

    public Product(String productId, String productName) {
        this.productId = productId;
        this.productName = productName;
    }

    @Override
    public String fetchOneId() {
        return getCategoryOneId();
    }

    @Override
    public void bindOneName(String categoryOneName) {
        setCategoryOneName(categoryOneName);
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getCategoryOneId() {
        return categoryOneId;
    }

    public void setCategoryOneId(String categoryOneId) {
        this.categoryOneId = categoryOneId;
    }

    public String getCategoryOneName() {
        return categoryOneName;
    }

    public void setCategoryOneName(String categoryOneName) {
        this.categoryOneName = categoryOneName;
    }

    @Override
    public String toString() {
        return "Product{" + "productId='" + productId + '\'' + ", productName='" + productName + '\'' + ", categoryOneId='" + categoryOneId + '\'' + ", categoryOneName='" + categoryOneName + '\'' + '}';
    }
}
